package com.zx.idc.backend.gui.api.commom.base;

import com.zx.idc.common.spring.SpringBeanUtil;
import com.zx.idc.ds.sys.service.ISysConfigurationService;
import org.springframework.transaction.annotation.Transactional;
import static com.zx.idc.common.attributes.InterfaceParamConfiguration.WEB_SERVICE_EXTERNAL_ADDRESS;


@Transactional(rollbackFor = Exception.class)
public abstract class BaseIDCCommandService extends BaseIDCCommand {


    public BaseIDCCommandService() {
    }

    protected String getVal(String key) {
        ISysConfigurationService iSysConfigurationService = SpringBeanUtil.getBean(ISysConfigurationService.class);
        return iSysConfigurationService.getVal(key);
    }

    protected String getIdcCallbackCommandAddress() {
        return getVal(WEB_SERVICE_EXTERNAL_ADDRESS);
    }

}
